﻿<%@ Page Language="C#" MasterPageFile="~/WebShop.master" AutoEventWireup="true" CodeFile="ProductDetail.aspx.cs"
    Inherits="Shopping_Stall_ProductDetail" %>

<%@ Register Src="../../Pub/Module/InfoDetailPD.ascx" TagName="InfoDetailPD" TagPrefix="uc4" %>
<%@ Register Src="../../Pub/Module/J_Product.ascx" TagName="J_Product" TagPrefix="uc2" %>
<%@ Register Src="../../Pub/Module/ProductComment.ascx" TagName="ProductComment"
    TagPrefix="uc3" %>
<%@ Register Src="../../Pub/Module/J_ProductImages.ascx" TagName="ProductImages"
    TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script type="text/javascript">
  $(document).ready(function() {
    $(".tabLink").each(function(){
      $(this).click(function(){
        tabeId = $(this).attr('id');
        $(".tabLink").removeClass("activeLink");
        $(this).addClass("activeLink");
        $(".tabcontent").addClass("hide");
        $("#"+tabeId+"-1").removeClass("hide")   
        return false;	  
      });
    });  
  });  
    </script>

    <ul class="fixUlBlock" style="width: 100%; float: left">
        <li>
            <div class="divBlock" style="text-align: left; vertical-align: top">
                <ul class="fixUlBlock">
                    <li>
                        <ul class="fixUlBlock">
                            <li>
                                <asp:Label ID="lblKind" runat="server"></asp:Label>
                                <asp:Label ID="lblKindNo" runat="server" Text="F" Visible="false"></asp:Label></li>
                            <li>
                                <asp:Literal ID="ltlImages" runat="server"></asp:Literal></li>
                        </ul>
                        <ul class="fixUlBlock" style="vertical-align: top; padding: 5px;">
                            <li style="padding-bottom: 5px; padding-top: 20px">
                                <asp:Label ID="lblTenSP" runat="server" CssClass="lbl_TitleProduct" Text='' Style="font-size: 14px"></asp:Label>
                            </li>
                            <li>
                                <asp:Panel ID="pnlKindNo" runat="server" Width="100%" CssClass="divBlock" Style="text-align: left">
                                    <ul class="fixUlBlock">
                                        <li>
                                            <asp:Label ID="Label3" runat="server" CssClass="lbl_TitlePrice" Text="Bảo hành: "></asp:Label>
                                            <asp:Label ID="lblWarranty" runat="server" CssClass="lbl_Properties" Text=''></asp:Label>
                                            <asp:Label ID="Label3434" runat="server" CssClass="lbl_TitlePrice" Text="Tháng"></asp:Label></li>
                                        <li>
                                            <asp:Panel ID="pnlPrice" runat="server">
                                                <asp:Label ID="Label1" runat="server" CssClass="lbl_TitlePrice" Text="Giá: "></asp:Label>
                                                <asp:Label ID="lblDongia" runat="server" CssClass="lbl_Price" Text=''></asp:Label>
                                                <asp:Label ID="lblRate" runat="server" CssClass="lbl_Rate" Text='' ForeColor="Navy"></asp:Label>
                                            </asp:Panel>
                                        </li>
                                        <li>
                                            <asp:Panel ID="pnlSaleOf" runat="server">
                                                <asp:Label ID="Label222" runat="server" CssClass="lbl_TitlePrice" Text="Chỉ còn: "></asp:Label>
                                                <asp:Label ID="lblDiscountPrice" runat="server" CssClass="lbl_Price" Text=''></asp:Label>
                                                <asp:Label ID="lblDiscountRate" runat="server" CssClass="lbl_Rate" Text='' ForeColor="Navy"
                                                    Font-Size="13px"></asp:Label>
                                            </asp:Panel>
                                        </li>
                                        <li>
                                            <asp:Label ID="Label10" runat="server" Font-Bold="True" Text="Số lượng:" CssClass="lbl_TitlePrice"></asp:Label>
                                            <asp:TextBox ID="txtQuantity" runat="server" MaxLength="2" Style="vertical-align: middle;
                                                text-align: center" Width="40px" BorderColor="DarkSlateBlue" BorderStyle="Solid"
                                                BorderWidth="1px" ForeColor="blue">1</asp:TextBox>
                                        </li>
                                    </ul>
                                </asp:Panel>
                                <asp:Panel ID="pnlFilm" runat="server" Width="100%" CssClass="divBlock" Style="text-align: left"
                                    Visible="false">
                                    <ul class="fixUlBlock">
                                        <li>
                                            <asp:Label ID="Label2" runat="server" CssClass="lbl_TitlePrice" Text="Dung lượng: "></asp:Label>
                                            <asp:Label ID="lblCapacity" runat="server" CssClass="lbl_Properties" Text=''></asp:Label>
                                        </li>
                                    </ul>
                                </asp:Panel>
                            </li>
                            <li style="padding: 10px; text-align: right">
                                <asp:ImageButton ID="ImgGioHang" runat="server" ImageUrl="~/Images/Icon/btnDetail.png"
                                    OnClick="ImgGioHang_Click" CausesValidation="false" />
                            </li>
                        </ul>
                    </li>
                </ul>
            </div>
        </li>
        <li style="padding: 10px 0px 10px 0px;">           
                <uc1:ProductImages ID="ProductImages1" runat="server" />       
        </li>
        <li style="padding: 10px; padding-left:0; padding-right:0">
            <div style="padding-left: 2px; white-space: normal; padding-right: 2px; width: 100%"
                align="left">
                <div class="tab-box">
                    <a href="javascript:;" class="tabLink activeLink" id="cont-1" onclick="fnIndexTag(this)">
                        Chi tiết sản phẩm</a>
                    <!--  <a href="javascript:;" class="tabLink " onclick="fnIndexTag(this)"                            id="cont-2">Hình ảnh(<asp:Label ID="lblCTagImg" runat="server" Text="0"></asp:Label>)</a>-->
                    <a href="javascript:;" class="tabLink " onclick="fnIndexTag(this)" id="cont-2">Nhận
                        xét(<asp:Label ID="lblCTagComment" runat="server" Text="0"></asp:Label>)</a>
                    <a href="javascript:;" class="tabLink " onclick="fnIndexTag(this)" id="cont-3">Sản phẩm
                        tương tự(<asp:Label ID="lblCTagPD" runat="server" Text="0"></asp:Label>)</a>
                </div>
                <div class="tabcontent" id="cont-1-1">
                    <div align="left" style="text-align: left">
                        <uc4:InfoDetailPD ID="InfoDetailPD1" runat="server" />
                    </div>
                </div>
                <!-- 
                <div class="tabcontent hide" id="cont-2-1">
                    <div align="center">
                        
                    </div>
                </div>
               -->
                <div class="tabcontent hide" id="cont-2-1">
                    <div align="center">
                        <uc3:ProductComment ID="ProductComment1" runat="server" />
                    </div>
                </div>
                <div class="tabcontent hide" id="cont-3-1">
                    <div align="center">
                        <uc2:J_Product ID="J_Product1" runat="server" Type="SameCatProduct" Cols="4" />
                    </div>
                </div>
            </div>
        </li>
    </ul>
    <input type="hidden" value="" runat="server" id="hIndexTag" />

    <script language="javascript" type="text/javascript">
    
    
    </script>

    <script language="javascript" type="text/javascript">
    try{
    window.onload=FindIndex();
    }
    catch(e){}
   function FindIndex()
   {
        var hIndexTag=document.getElementById("<%= hIndexTag.ClientID%>");        
        if(hIndexTag.value!="")
        {
            for(var i=1;i<=4;i++)
            {
                var divObj=document.getElementById("cont-"+i);
               var divCObj =document.getElementById("cont-"+i+"-1");
                 divObj.className="tabLink";
                 divCObj.className="tabcontent hide";
            }
            var divObj=document.getElementById(hIndexTag.value);
            var divCObj=document.getElementById(hIndexTag.value+"-1"); 
            divObj.className="tabLink activeLink";
           divCObj.className="tabcontent"; 
        }
    }
    
    
    function fnIndexTag(obj)
    {
        var hIndexTag=document.getElementById("<%= hIndexTag.ClientID %>");
        hIndexTag.value=obj.id;       
    }
    function fnTabLinkOut(obj)
    {
        obj.style.color="#666666";
        
    }
     function fnTabLinkOver(obj)
    {
        obj.style.color="green";

    }
    
     
    </script>

</asp:Content>
